﻿window.fbAsyncInit = function () {
    FB.init({
        appId: '200190106807031', // App ID
        channelUrl: '~/Scripts/Channel.html', // Channel File
        status: true, 
        cookie: true
    });
};
(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) { return; }
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

function FBFeed(l, p, c, d) {
    FB.ui({
        method: 'feed',
        display: 'popup',
        link: l,
        picture: p,
        name: '내가 만드는 최저가 공동구매 buy the people',
        caption: c,
        description: d
    }, function (response) {
          if (response && response.post_id) {
              //alert('Post was published.');
          } else {
              //alert('Post was not published.');
          }
      }
    );
}